package com.csl.xm.demo.service.impl;

import com.csl.xm.demo.dao.UserDao;
import com.csl.xm.demo.entity.User;
import com.csl.xm.demo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <pre>
 * 描述：用户服务实现类
 * </pre>
 *
 * @类名：com.csl.xm.demo.service.impl.UserServiceImpl
 * @作者： 1410HL0236
 * @创建日期: 2019/11/20 13:24
 */
@Service(value = "userService")
public class UserServiceImpl implements UserService {
  @Autowired
  UserDao userDao;

  @Override
  public User save(User user) {
    return userDao.save(user);
  }

  @Override
  public User findById(String id) {
    return userDao.findById(id);
  }

  @Override
  public void delete(User user) {
    userDao.delete(user);
  }

  @Override
  public List<User> findAll() {
    return userDao.findAll();
  }
}
